using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Activities;
using T2.WebSecurity.Business;
using T2.WebSecurity.Business.Entities.Interfaces;
using T2.WebSecurity.Business.Entities;
using T2.WebSecurity.Business.Entities.Search.Interfaces;
using T2.WebSecurity.Business.Entities.Search;
namespace T2.WebSecurity.Business.Workflow.Activites
{
	public sealed class Db_T2_WebSecurity_PasswordQuestion_GetAll : CodeActivity
	{
		private IBusinessService bs = null;
		public OutArgument<IPasswordQuestion_biz[]> RetVal { get; set; }
		public InArgument<IBusinessService> BS {get;set;}
		protected override void Execute(CodeActivityContext context)
		{
			bs = context.GetValue(BS);
			IPasswordQuestion_biz[] tempReturn = PasswordQuestion_GetAll();
			context.SetValue(RetVal, tempReturn);
		}
		public IPasswordQuestion_biz[] PasswordQuestion_GetAll()
		{
			try
			{
				IPasswordQuestion_biz param = new PasswordQuestion_biz();
				param.Action = "GetAll";
				param.PageNumber = 1;
				param.PageSize = 999999;
				param.SortColumn = "PasswordQuestionID" ;
				param.SortType = "asc";
				List<IPasswordQuestion_biz> retVal = bs.PasswordQuestionController_Get(param, true, true);
				return retVal.ToArray();
			}
			catch (Exception ex)
			{
				throw new ApplicationException(ex.Message);
			}
		}
	}
}
